﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace PenguinForce
{
    public class Footsteps
    {

        public Footsteps(Vector2 position, Vector2 rotation)
        {
            duration = MAX_DURATION;
            m_position = position;
            m_rotation = (float)Math.Atan2((float)rotation.Y,(float)rotation.X);
        }

        public void Update(GameTime gameTime)
        {
            float elapsedTime = gameTime.ElapsedGameTime.Milliseconds;
            duration -= elapsedTime;

        }

        

        public void Draw(SpriteBatch sprite, Texture2D texture) {
 
            

            sprite.Draw(texture, m_position, new Rectangle(0, 0, 32, 32), Color.White, m_rotation, new Vector2(texture.Width / 2, texture.Height / 2), 0.4f, SpriteEffects.None, 1.0f);

           

        }

        public float duration;
        private Vector2 m_position;
        private float m_rotation;
        private const float MAX_DURATION = 10000.0f;

    }
}
